-
Notifications
You must be signed in to change notification settings - Fork 26
[DPE-7678] recreate predefined roles #1017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
faad5af
to
149fa04
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 16/edge #1017 +/- ##
========================================
Coverage 70.28% 70.28%
========================================
Files 16 16
Lines 3806 3806
Branches 545 545
========================================
Hits 2675 2675
Misses 1001 1001
Partials 130 130 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
24d19f7
to
5110adb
Compare
4c7a411
to
9e8929e
Compare
9e8929e
to
baf3220
Compare
It is almost perfect! I do not see:
Other parts looks perfect!!! |
) | ||
|
||
await ops_test.model.wait_for_idle(status="active", timeout=1500) | ||
await ops_test.model.wait_for_idle(status="active", timeout=1800) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test failed with timeouts consistently in a previous run: https://github.com/canonical/postgresql-operator/actions/runs/16083228579
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tested with LB DB, it doesn the job, but pgaudit will have to follow as separate PR.
connection = None | ||
try: | ||
for database in ["postgres", "template1"]: | ||
for database in self._get_existing_databases(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving the loop in set_up_database
and passing a cursor made the plugin test fail consistently: https://github.com/canonical/postgresql-operator/actions/runs/16081464233/job/45386910548
unit-postgresql-0: 22:27:52 ERROR unit.postgresql/0.juju-log __main__:Failed to disable plugin: cannot drop table pg_hba because extension orafce requires it
HINT: You can drop extension orafce instead.
CONTEXT: SQL statement "DROP TABLE IF EXISTS pg_hba"
PL/pgSQL function update_pg_hba() line 13 at SQL statement
SQL statement "CREATE SCHEMA tiger_data"
PL/pgSQL function inline_code_block line 4 at SQL statement
Leaving the separate loops be for now.
Recreate roles on existing databases in case when an external backup is being restored within the charm.
Checklist